package com.groupfifteen.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.groupfifteen.entity.SysJudgeQuestionEntity;

import java.util.List;

public interface SysJudgeQuestionService {

    // 分页查询判断题信息
    IPage<SysJudgeQuestionEntity> querySysJudgeQuestions(SysJudgeQuestionEntity sysJudgeQuestionEntity, int pageNo, int pageSize);

    // 可以添加其他业务方法，例如添加、删除、更新等
    // 例如：
    // int addSysJudgeQuestion(SysJudgeQuestionEntity sysJudgeQuestionEntity);
    // int deleteSysJudgeQuestion(Long id);
    // int updateSysJudgeQuestion(SysJudgeQuestionEntity sysJudgeQuestionEntity);
    Integer AddJudgeQuestion(SysJudgeQuestionEntity sysJudgeQuestionEntity);
    Integer DeleteJudgeQuestion(Integer question_id);
    SysJudgeQuestionEntity GetJudgeQuestion(Integer question_id);
    Integer UpdateJudgeQuestion(SysJudgeQuestionEntity sysJudgeQuestionEntity);

    /**
     * 通过试卷id查询问题
     *
     * @param paperId 试卷id
     * @return 问题
     */
    List<SysJudgeQuestionEntity> findByIdAndType(Integer paperId);

    /**
     * 查询最后一个判断题id
     *
     * @return 最后一个判断题
     */
    SysJudgeQuestionEntity findOnlyQuestionId();
    /**
     * 通过学科查询
     *
     * @param subject 学科
     * @param pageNo 分页数
     * @return 题目id
     */
    List<Integer> findBySubject(String subject,Integer pageNo);
}